<template>
  <div class="page">
      <el-table
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column
      prop="job_name"
      label="日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址">
    </el-table-column>
  </el-table>
  </div>
</template>

<script>
import { allStudent } from "@/api/student"
import { localData } from "@/util/local";

export default {
  data() {
    return {
        tableData: [],
        userInfo: {}
    };
  },
  created() {
    this.userInfo = localData("get", "userinfo")
  },
  mounted(){
    this.getAllStudent()
  },
  methods:{
    getAllStudent(){
      allStudent().then(res =>{
        this.tableData = res.data.Students
      })
    }
  }
};
</script>

<style scoped>
.page {
  min-height: 100vh;
}
</style>